#有一个列表lst1 = [1, 4, 9, 16, 2, 5, 10, 35] ，生成一个新列表，要求新列表元素是lst1相邻2项的和
ls1 = [1, 4, 9, 16, 2, 5, 10, 35]
ls2 = []
ind = 0
for i in ls1:
    if ind < len(ls1) - 1:
        a = ls1[ind] + ls1[ind + 1]
        ind += 1
        ls2.append(a)